package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.RegistrationRecordExample.E_PARENT_SUBJECT_ID;
import static org.jsola.hr.example.RegistrationRecordExample.E_PARENT_SUBJECT_TYPE;
import static org.jsola.hr.example.RegistrationRecordExample.E_SUBJECT_ID;
import static org.jsola.hr.example.RegistrationRecordExample.E_SUBJECT_TYPE;
import static org.jsola.hr.example.RegistrationRecordExample.M_PARENT_SUBJECT_ID_MAX;
import static org.jsola.hr.example.RegistrationRecordExample.M_PARENT_SUBJECT_ID_NOT_NULL;
import static org.jsola.hr.example.RegistrationRecordExample.M_PARENT_SUBJECT_TYPE_MAX;
import static org.jsola.hr.example.RegistrationRecordExample.M_PARENT_SUBJECT_TYPE_NOT_NULL;
import static org.jsola.hr.example.RegistrationRecordExample.M_SUBJECT_ID_MAX;
import static org.jsola.hr.example.RegistrationRecordExample.M_SUBJECT_ID_NOT_NULL;
import static org.jsola.hr.example.RegistrationRecordExample.M_SUBJECT_TYPE_MAX;
import static org.jsola.hr.example.RegistrationRecordExample.M_SUBJECT_TYPE_NOT_NULL;
import static org.jsola.hr.example.RegistrationRecordExample.N_PARENT_SUBJECT_ID;
import static org.jsola.hr.example.RegistrationRecordExample.N_PARENT_SUBJECT_TYPE;
import static org.jsola.hr.example.RegistrationRecordExample.N_SUBJECT_ID;
import static org.jsola.hr.example.RegistrationRecordExample.N_SUBJECT_TYPE;

/**
 * 登录记录
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【登录记录】的参数")
@Data
public class RegistrationRecordAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID, required = true)
    @NotNull(message = M_SUBJECT_ID_NOT_NULL)
    @Length(max = 32, message = M_SUBJECT_ID_MAX)
    private String subjectId;

    @ApiModelProperty(notes = N_PARENT_SUBJECT_ID, example = E_PARENT_SUBJECT_ID, required = true)
    @NotNull(message = M_PARENT_SUBJECT_ID_NOT_NULL)
    @Length(max = 32, message = M_PARENT_SUBJECT_ID_MAX)
    private String parentSubjectId;

    @ApiModelProperty(notes = N_SUBJECT_TYPE, example = E_SUBJECT_TYPE, required = true)
    @NotNull(message = M_SUBJECT_TYPE_NOT_NULL)
    @Length(max = 32, message = M_SUBJECT_TYPE_MAX)
    private String subjectType;

    @ApiModelProperty(notes = N_PARENT_SUBJECT_TYPE, example = E_PARENT_SUBJECT_TYPE, required = true)
    @NotNull(message = M_PARENT_SUBJECT_TYPE_NOT_NULL)
    @Length(max = 32, message = M_PARENT_SUBJECT_TYPE_MAX)
    private String parentSubjectType;


}

